<style>
    .title{
        font-size: 20px;font-weight: bold;text-align: center;margin: 10px 0;
    }
    .test_block{
        padding: 10px;
        font-size: 14px;
    }
    .block_title{
        font-size: 15px;
        color: #1688f1;
        font-weight: bold;
        display: flex;
        align-items: center;
    }
    .title_score_desc{
        color: crimson;font-size: 12px;
    }
    .question_item{
        margin: 10px 0 10px 10px;
    }
    .question_title{
        display: flex;
        align-items: baseline;
    }
    .text_key{
        margin-right: 5px;
    }
    .answer_list{
        display: flex;
        align-items: baseline;
        margin-left: 10px;
    }
    .answer_item{
        margin: 10px 10px;font-weight: bold;
    }
    .wd_value{
        color: #18bc9c;font-weight: bold;margin-top: 10px;font-size: 18px;
    }
    .pf_text{
        margin-right: 10px;
    }
    .pf_warp{
        margin-top: 6px;font-weight: bold;
        border: 1px crimson dashed;padding: 10px;
    }
    .pf_box{
        display: flex;align-items: center;color: crimson;font-weight: bold;
        padding: 10px;
    }
    .wd_reference{
        border: 1px #f39c12 dashed;margin-top: 20px;padding: 10px;
    }
</style>
<div class="title">{$test_data.title|htmlentities}</div>

<form id="check-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <!-- 题型列表 start -->
    {volist name="question" id="v" key="k"}
    <div class="test_block">
        <!-- 题型标题 start -->
        {if condition="count($v.question) > 0"}
        <div class="block_title">
            <div class="block_title_text">{$v.number|htmlentities}、{$v.value|htmlentities}</div>
            <div class="title_score_desc">（{$v.total_score_desc|htmlentities}）</div>
        </div>
        {/if}
        <!-- 题型标题 end -->
        <!-- 题目列表 start -->
        <div class="block_question">
            {volist name="v.question" id="v2" key="k2"}
            <div class="question_item">
                <!-- 问题标题 start -->
                {if condition="$v.id != 4"}
                <div class="question_title">
                    <div class="text_key">{$k2}.</div>
                    <div class="text_title">{$v2.title|htmlentities}</div>
                    <div class="text_score"></div>
                </div>
                {else /}
                <div class="question_title">
                    <div class="text_key">{$k2}.</div>
                    <div class="text_title">
                        {volist name="$v2.title_arr" id="v3"}
                            {if condition="$v3==='(________)'"}
                                <span class="wd_value">{$v2.answer_value[$key]}</span>
                            {else /}
                                <span>{$v3|htmlentities}</span>
                            {/if}
                        {/volist}
                    </div>
                </div>
                {/if}
                <!-- 问题标题 end -->

                <!-- 选择题 start -->
                {if condition="$v.id == 1"}
                <div class="answer_list">
                    {volist name="$v2.option_arr" id="v3" key="k3"}
                    <div class="answer_item {if condition='$v2.answer_value == $v3'}wd_value{/if}">
                        {$v3|htmlentities}
                    </div>
                    {/volist}
                </div>
                {/if}
                <!-- 选择题 end -->
                <!-- 多选题 start -->
                {if condition="$v.id == 2"}
                <div class="answer_list">
                    {volist name="$v2.option_arr" id="v3" key="k3"}
                    <div class="answer_item {if condition='in_array($v3,$v2.answer_value)'}wd_value{/if}">
                        {$v3|htmlentities}
                    </div>
                    {/volist}
                </div>
                {/if}
                <!-- 多选题 end -->
                <!-- 判断题 start -->
                {if condition="$v.id == 3"}
                <div class="answer_list">
                    {volist name="$v2.option_arr" id="v3" key="k3"}
                    <div class="answer_item {if condition='$v2.answer_value == $v3'}wd_value{/if}">
                        {if condition="$v3=='正确'"}✔️{else /}❌{/if} {$v3}
                    </div>
                    {/volist}
                </div>
                {/if}
                <!-- 判断题 end -->
                <!-- 问答题 start -->
                {if condition="$v.id == 5"}
                <div class="answer_list">
                    <div class="wd_value">{$v2.answer_value|htmlentities}</div>
                </div>
                <div class="pf_warp">
                    <div class="pf_box">
                        <div class="pf_text">评分：</div>
                        <input class="form-control" data-rule="required" min="0" max="{$v2.score|htmlentities}" type="number" name="score_arr[{$k|htmlentities}][{$k2|htmlentities}]" style="width: 100px;">
                        <input type="hidden" name="score_num[{$k|htmlentities}][{$k2}]" value="{$v2.score|htmlentities}">
                    </div>
                    <div class="wd_reference">
                        <b>答案参考：</b>
                        {$v2.reference|default=""}
                    </div>
                </div>

                {/if}
                <!-- 问答题 end -->

            </div>
            {/volist}
        </div>
        <!-- 题目列表 end -->
    </div>
    {/volist}
    <!-- 题型列表 end -->

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>

</form>